package com.insigma.cisco.itc.tms.teammanagement.dao.daoImpl;

import java.util.List;

import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import com.insigma.cisco.itc.tms.common.domain.User;
import com.insigma.cisco.itc.tms.teammanagement.dao.ListMemberDao;

public class ListMemberDaoImpl extends HibernateDaoSupport implements
		ListMemberDao {

	@SuppressWarnings("unchecked")
	@Override
	public List<User> getMemberList(String teamName) {
		List<User> memberlist = getHibernateTemplate().find(
				"from User as u " + "where u.team =  \'" + teamName + "\'");
		return memberlist;
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<User> getMyInformation(String username) {
		List<User> memberlist = getHibernateTemplate().find(
				"from User as u " + "where u.username =  \'" + username + "\'");
		return memberlist;
	}

}
